import request from '@/request'

// api获取评论列表
export function getCommentsByArticle(id) {
    return request({
        url: `/comments/article/${id}`,
        method: 'get'
    })
}

// api发表评论
export function publishComment(comment, token) {
    return request({
        headers: { 'Authorization': token },
        url: '/comments/create/change',
        method: 'post',
        data: comment
    })
}
